#include "DepthBuffer.h"

namespace devii
{

DepthBuffer::DepthBuffer(const unsigned int width, const unsigned int height)
{
	this->width = width;
	this->height = height;
	depth_buffer = NULL;
	shader_resource = NULL;
}

DepthBuffer::~DepthBuffer()
{
	if(depth_buffer)
		depth_buffer->Release();
	if(shader_resource)
		shader_resource->Release();
}

void DepthBuffer::setDepthBuffer(ID3D11DepthStencilView * const depth_buffer)
{
	this->depth_buffer = depth_buffer;
}

ID3D11DepthStencilView * DepthBuffer::getDepthBuffer()
{
	return depth_buffer;
}

void DepthBuffer::setShaderResource(ID3D11ShaderResourceView * shader_resource)
{
	this->shader_resource = shader_resource;
}

ID3D11ShaderResourceView * DepthBuffer::getShaderResource()
{
	return shader_resource;
}

}